//
//  WYAlertView.m
//  JJEW_COMPANY
//
//  Created by admin on 2017/3/23.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "WYAlertView.h"
@interface WYAlertView()
@property (nonatomic,strong)UIView *maskView;
@end
@implementation WYAlertView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
+(UIView *)ViewForTitle:(NSString *)Tiptitle WithSureBtnName:(NSString *)sureBtn WithSureBtnColor:(UIColor *)sureColor WithCancelBtnName:(NSString *)cancelName WithCancelBtnColor:(UIColor *)cancelColor
{
    UIView *view=[[UIView alloc]init];
    view.frame=CGRectMake(150, 150, 150, 150);
    view.backgroundColor=[UIColor redColor];
    
    return view;
}
-(UIView *)maskView
{
    if (!_maskView) {
        _maskView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
        _maskView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
        _maskView.alpha = 0.5f;
        UIButton *button=[[UIButton alloc]init];
        [_maskView addSubview:button];
        button.frame=_maskView.bounds;
        [button addTarget:self action:@selector(exit:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _maskView;
}
-(void)exit:(UIButton *)btn
{
    [[UIApplication sharedApplication].keyWindow addSubview:_maskView];
}
@end
